package com.fxb.chapter02consumer.controller;

import com.fxb.chapter02consumer.service.ConsumerService;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 消费者demo，
 *
 * @author fangjiaxiaobai
 * @date 2021-10-13 21:00
 */
@RestController
public class ConsumerController {
    @Resource
    private ConsumerService consumerService;

    @GetMapping("chapter02/sayHello/{name}")
    public String sayHello(@PathVariable String name) {
        return consumerService.sayHello(name);
    }
}
